package com.zeroext.show.service.impl;

import com.zeroext.dao.common.SimplePage;
import com.zeroext.service.common.BaseService;
import com.zeroext.show.dao.BookDAO;
import com.zeroext.show.entity.Book;
import com.zeroext.show.service.BookService;

public class BookServiceImpl extends BaseService implements BookService {
    private BookDAO bookDAO;
    public SimplePage<Book> listBooks(int begin, int pageSize) {
        return bookDAO.searchBook(begin, pageSize, null);
    }
    
    public Book getBook(Long id) {
        return bookDAO.getBook(id);
    }

    public Book saveBook(Book book) {
        return bookDAO.saveBook(book);
    }
    
    public BookDAO getBookDAO() {
        return bookDAO;
    }
    public void setBookDAO(BookDAO bookDao) {
        this.bookDAO = bookDao;
    }
}
